import request from '@/utils/request'

export function doSelBean(query) {
  return request({
    url: '/menu/doSelBean',
    method: 'get',
    params: query
  })
}
//生成菜单编号
export function genCode(query) {
  return request({
    url: '/menu/genCode',
    method: 'get',
    params: query
  })
}
export function updateMenu(data) {
  return request({
    url: '/menu/update',
    method: 'post',
    data
  })
}

export function addMenu(data) {
  return request({
    url: '/menu/add',
    method: 'post',
    data
  })
}

export function deleteMenu(id) {
  return request({
    url: `/menu/${id}`,
    method: 'delete'
  })
}

